import request from '@/utils/request'

// 查询客户信息列表
export function listSysSalesCustomers(query) {
  return request({
    url: '/SysSales/SysSalesCustomers/list',
    method: 'get',
    params: query
  })
}

// 查询客户信息详细
export function getSysSalesCustomers(customerId) {
  return request({
    url: '/SysSales/SysSalesCustomers/' + customerId,
    method: 'get'
  })
}

// 新增客户信息
export function addSysSalesCustomers(data) {
  return request({
    url: '/SysSales/SysSalesCustomers',
    method: 'post',
    data: data
  })
}

// 修改客户信息
export function updateSysSalesCustomers(data) {
  return request({
    url: '/SysSales/SysSalesCustomers',
    method: 'put',
    data: data
  })
}

// 删除客户信息
export function delSysSalesCustomers(customerId) {
  return request({
    url: '/SysSales/SysSalesCustomers/' + customerId,
    method: 'delete'
  })
}
//根据客户查询产品数量
export function getProductCount(customerId) {
  return request({
    url: '/SysSales/SysSalesCustomers/quantities/' + customerId,
    method: 'get'
  })
}